<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.ball {
				--delay: 0s;
				width: 50px;
				height: 50px;
				border-radius: 50%;
				background-color: royalblue;
				margin-bottom: 50px;
				animation: move 1s var(--delay) linear forwards ;
				animation-play-state: paused;
			}
			@keyframes move {
				0% {
					clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%);
				}
				50% {
					transform: translateX(100px) scale(1.5);
				}
				100% {
					transform: translateX(200px);
					clip-path: polygon(0 0%, 100% 0, 100% 100%, 0 100%);
				}
			}
		</style>
	</head>
	<body>
		<div class="container">
			<div class="ball"></div>
			<input type="range" min="0" max="1" step="0.01">
		</div>
		<script>
			const input = document.querySelector("input");
			const ball = document.querySelector(".ball");
			function call() {
				ball.style.setProperty("--delay", `-${input.value}s`);
			};
			input.oninput = call;
			call();
		</script>
	</body>
</html>